package com.example.student.controller;

import com.example.student.common.Result;
import com.example.student.model.DashboardDataVO;
import com.example.student.service.DashboardService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/api/dashboard")
public class DashboardController {

    @Resource
    private DashboardService dashboardService;

    /**
     * 获取仪表盘数据
     */
    @GetMapping
    public Result<DashboardDataVO> getDashboardData() {
        return Result.success(dashboardService.getDashboardData());
    }
} 